package com.pl.spring.cloud.alibaba.consumer.service;

import com.pl.spring.cloud.alibaba.consumer.service.fallback.EchoServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-provider", fallback = EchoServiceFallback.class)
public interface EchoService {
    //一旦提供者是用了路径参数，那么接口必须有@PathVariable
    @GetMapping(value = "/echo/{params}")
    public String echoTest(@PathVariable String params);

    @GetMapping(value = "/testLB")
    public String testLB();
}
